FROM nginx:latest

RUN mkdir -p /var/www/app/nichang/demo

COPY dist /var/www/app/nichang/demo
COPY docker-nginx.conf /etc/nginx/conf.d/default.conf
RUN d=`date +%Y%m%d%H%M%S` && echo "{ \"version\": \"$d\" }" > /var/www/app/nichang/demo/version.json

WORKDIR /var/www/app

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]

